---
layout: "default"
title: "_StringElementType"
description: "Swift documentation for '_StringElementType': Instances of conforming types are used in internal String."
keywords: "_StringElementType,protocol,swift,documentation,_fromUTF16CodeUnit,_toUTF16CodeUnit"
root: "/v1.2"
---

<div class="intro-declaration"><code class="language-swift">protocol _StringElementType</code></div>

<div class="discussion comment">
    <p>Instances of conforming types are used in internal <code>String</code>
representation.</p>
</div>

<table class="standard">
<tr>
<th id="inheritance">Inheritance</th>
<td>
<span class="viz"><a href="hierarchy/">View Protocol Hierarchy &rarr;</a></span>
</td>
</tr>



<tr>
<th>Import</th>
<td><code class="language-swift">import Swift</code></td>
</tr>

</table>






<h3>Static Methods</h3>
<div class="declaration" id="func--fromutf16codeunit_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func--fromutf16codeunit_">static func _fromUTF16CodeUnit(<wbr>_:)</a>
     <span class="required">Required</span>    
<div class="comment collapse" id="comment-func--fromutf16codeunit_"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">static func _fromUTF16CodeUnit(utf16: CodeUnit) -&gt; Self</code>
    
    
</div></div>
</div>
<div class="declaration" id="func--toutf16codeunit_">
<a class="toggle-link" data-toggle="collapse" href="#comment-func--toutf16codeunit_">static func _toUTF16CodeUnit(<wbr>_:)</a>
     <span class="required">Required</span>    
<div class="comment collapse" id="comment-func--toutf16codeunit_"><div class="p">
    

    <h4>Declaration</h4>    
    <code class="language-swift">static func _toUTF16CodeUnit(_: Self) -&gt; CodeUnit</code>
    
    
</div></div>
</div>



